package com.atguigu.day14.recusion.r1;

import org.junit.Test;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/16 16:35
 * @注释
 */
public class five {
    @Test
    public void test1(){
        int num = getNum(5);
        System.out.println("num = " + num);

    }

    private int getNum(int num) {
        if(num == 1){
            return 1;
        }
        return num * getNum(num - 1);
    }
}
